#include <stdio.h>

//实际上两个空瓶子就能喝一瓶
int main() {
    int n;
    while(scanf("%d",&n)!= EOF) {
        if(n==0) break;
        printf("%d\n",n/2);
    }
    return 0;
}